<?php

session_name("fancyform");
session_start();


$_SESSION['n1'] = rand(1,20);
$_SESSION['n2'] = rand(1,20);
$_SESSION['expect'] = $_SESSION['n1']+$_SESSION['n2'];


$str='';
if($_SESSION['errStr'])
{
$str='<div class="error">'.$_SESSION['errStr'].'</div>';
unset($_SESSION['errStr']);
}

$success='';
if($_SESSION['sent'])
{
$success='<h1>Thank you!</h1>';

$css='<style type="text/css">#contact-form{display:none;}</style>';

unset($_SESSION['sent']);
}
?>


<!DOCTYPE html>
<html dir="ltr" lang="en-US"><head><!-- Created by Artisteer v4.1.0.59782 -->
<meta charset="utf-8">
<title>Contacts</title>
<meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">

<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link rel="stylesheet" href="style.css" media="screen">
<!--[if lte IE 7]><link rel="stylesheet" href="style.ie7.css" media="screen" /><![endif]-->
<link rel="stylesheet" href="style.responsive.css" media="all">

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script src="jquery.js"></script>
<script src="script.js"></script>
<script src="script.responsive.js"></script>
<meta name="description" content="Description">
<meta name="keywords" content="Keywords">

<link rel="stylesheet" href="reveal.css">	

<link rel="stylesheet" type="text/css" href="jqtransformplugin/jqtransform.css" />
<link rel="stylesheet" type="text/css" href="formValidator/validationEngine.jquery.css" />
<link rel="stylesheet" type="text/css" href="demo.css" />

<?=$css?>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="jqtransformplugin/jquery.jqtransform.js"></script>
<script type="text/javascript" src="formValidator/jquery.validationEngine.js"></script>
<link rel="stylesheet" href="animated-menu.css"/>
<script type="text/javascript" src="jquery.reveal.js"></script>	
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<
<script type="text/javascript" src="script2.js"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="animated-menu.js" type="text/javascript"></script>



<link rel="stylesheet" href="themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="addresspicker.css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="./lib/jquery-ui-1.8.7.min.js"></script>
<script src="./src/jquery.ui.addresspicker.js"></script>


<script type="text/javascript" src="http://www.google.fr/jsapi"></script>
<script type="text/javascript">
google.load("maps", "3.4", {
other_params: "sensor=false&language=fr"
});
</script>
<script type="text/javascript" src="./javascripts/jquery.googlemap.js"></script>

<script type="text/javascript">
$(document).ready(function(){

$(function() {
var addresspicker =  $( "#addresspicker" ).addresspicker({
regionBias: "fr",
elements: {

}
});
});

$(function() {
$("#map").googleMap();
$("#map").addMarker({
coords: [33.5333333, -7.583333300000049], // GPS coords
title: 'Marker n°1', // Title
text:  '<b>Lorem ipsum</b> dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' // HTML content
});
})
$( "#addresspicker" ).keypress(function( event ) {

if ( event.which == 13 ) {

event.preventDefault();

var adresse = $('#addresspicker').val();
console.log(adresse);

//vider div itineraire
$( "#way" ).empty();


$(function() {
$("#map").googleMap();
$("#map").addWay({
start: "SIDI BERNOUSSI, Casablanca, Maroc", // Postal address for the start marker (obligatory)
end:  adresse, // Postal Address or GPS coordinates for the end marker (obligatory)
route : 'way', // Block's ID for the route display (optional)
langage : 'french' // language of the route detail (optional)
});
});

}

});
});
</script>
<style>.disweb-content .disweb-postcontent-0 .layout-item-old-0 { border-spacing: 15px 0px; border-collapse: separate;  }
.ie7 .disweb-post .disweb-layout-cell {border:none !important; padding:0 !important; }
.ie6 .disweb-post .disweb-layout-cell {border:none !important; padding:0 !important; }

</style></head>
<body>
<div id="disweb-main">
<div id="disweb-hmenu-bg" class="disweb-bar disweb-nav clearfix">
</div>
<header class="disweb-header clearfix">


<div class="disweb-shapes">

</div>




<nav class="disweb-nav clearfix">
<div>
<ul>
<li class="green"><a href="accueil.html" class="active">Accueil</a></li>
<li class="yellow"><a href="nos-pack.html">Nos Pack</a>
</li>
<li class="red"><a href="open-source.html">open source</a></li>
<li class="blue"><a href="contacts.html">Contacts</a></li></ul> 
</div>
</nav>
</nav>


</header>
<div class="disweb-sheet clearfix">
<div class="disweb-layout-wrapper clearfix">
<div class="disweb-content-layout">
<div class="disweb-content-layout-row">
<div class="disweb-layout-cell disweb-sidebar1 clearfix"><div class="disweb-vmenublock clearfix">
<div class="disweb-vmenublockheader">
<h3 class="t">Menu</h3>
</div>
<div class="disweb-vmenublockcontent">
<ul class="disweb-vmenu"><li><a href="accueil.html" class="">Accueil</a></li><li><a href="nos-pack.html" class="">Nos Pack</a><ul class=""><li><a href="nos-pack/pack-basic.html" class="">Pack Basic</a></li><li><a href="nos-pack/pack-medium.html" class="">Pack Medium</a></li><li><a href="nos-pack/pack-pro.html" class="">Pack Pro</a></li></ul></li><li><a href="open-source.html" class="">open source</a></li><li><a href="contacts.html" class="active">Contacts</a></li></ul>

</div>
</div></div>
<div class="disweb-layout-cell disweb-content clearfix"><article class="disweb-post disweb-article">
<h2 class="disweb-postheader">Contacts</h2>

<div class="disweb-postcontent disweb-postcontent-0 clearfix"><div class="disweb-content-layout layout-item-old-0">
<div class="disweb-content-layout-row">
<div class="disweb-layout-cell" style="width: 33%">
<p>Sed mi sit vivamus sed lorem vestibulum sodales quis. Non tristique nunc eleifend venenatis ligula purus quis consequat interdum consectetuer consequat vivamus eros.</p><p>Et dui volutpat nisi enim ante est sociosqu curabitur dui vivamus. Sed et tortor lobortis nisl. In ultrices vulputate volutpat quam vivamus tristique viverra sit. Congue semper posuere eget nunc eget lorem.</p><h3>Our Address</h3><p>Risus et ut sed leo ac leo id.<br>Principal Ville, Country 12345-6789</p><p>Tortor dignissim.<br>Imperdiet fusce at.</p><p>A.<a href="#">http://www.domain.com<br></a>A. <a href="#">email@domain.com</a></p>
</div><div class="disweb-layout-cell" style="width: 67%">

<div id="main-container">

<div id="form-container">
<h1>Fancy Contact Form</h1>
<h2>Drop us a line and we will get back to you</h2>

<form id="contact-form" name="contact-form" method="post" action="submit.php">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="15%"><label for="name">Name</label></td>
<td width="70%"><input type="text" class="validate[required,custom[onlyLetter]]" name="name" id="name" value="<?=$_SESSION['post']['name']?>" /></td>
<td width="15%" id="errOffset">&nbsp;</td>
</tr>
<tr>
<td><label for="email">Email</label></td>
<td><input type="text" class="validate[required,custom[email]]" name="email" id="email" value="<?=$_SESSION['post']['email']?>" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><label for="subject">Subject</label></td>
<td><select name="subject" id="subject">
<option value="" selected="selected"> - Choose -</option>
<option value="Question">Question</option>
<option value="Business proposal">Business proposal</option>
<option value="Advertisement">Advertising</option>
<option value="Complaint">Complaint</option>
</select>          </td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><label for="message">Message</label></td>
<td><textarea  style="width: 269px; height: 91px;" name="message" id="message" class="validate[required]" cols="35" rows="5"><?=$_SESSION['post']['message']?></textarea></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td><label for="captcha"><?=$_SESSION['n1']?> + <?=$_SESSION['n2']?> =</label></td>
<td><input type="text" class="validate[required,custom[onlyNumber]]" name="captcha" id="captcha" /></td>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
<td colspan="2"><input type="submit" name="button" id="button" value="Submit" />
<input type="reset" name="button2" id="button2" value="Reset" />

<?=$str?>          <img id="loading" src="img/ajax-load.gif" width="16" height="16" alt="loading" /></td>
</tr>
</table>
</form>
<?=$success?>
</div>
<div class="tutorial-info">	
This is a Tutorialzine demo. View the <a href="http://tutorialzine.com/2009/09/fancy-contact-form/">original tutorial</a>, or download the <a href="demo.zip">demo files</a>.    </div>

</div>

</div>
</div>
</div>
<div class="disweb-content-layout layout-item-old-0">
<div class="disweb-content-layout-row">
<div class="disweb-layout-cell" style="width: 100%">

<div class='input'>
<label>Address : </label><input id="addresspicker" />

<a href="#" class="big-link" data-reveal-id="myModal" data-animation="fadeAndPop">
Fade and Pop
</a>	


</div>
<div style='clear:left;'>
<div id="map" style="width: 800px; height: 300px;"></div>
</div>
</div>
</div>
</div></div>



</article></div>
</div>
</div>
</div>
</div>
<footer class="disweb-footer clearfix">
<div class="disweb-footer-inner">
<div style="position:relative;display:inline-block;padding-left:40px;padding-right:40px"><a title="RSS" class="disweb-rss-tag-icon" style="position: absolute; bottom: -10px; left: -6px; line-height: 32px;" href="#"></a><p><br></p><p>Imperdiet penatibus nisl a elit varius. <a href="#">Privacy Policy</a></p></div>
<p class="disweb-page-footer">
<span id="disweb-footnote-links">Designed by <a href="karimos.hd.free.fr" target="_blank">karim</a>.</span>
</p>
</div>
</footer>

</div>


</body>
</html>

<div id="myModal" class="reveal-modal">
<div style="overflow-y:scroll;height:250px;width:100%;">
<div id='way'></div>
</div>
<a class="close-reveal-modal">&#215;</a>
</div>